<html>
    <head>
        <script>

            var inherit = function (base) {
                var Prototype = function () {
                }
                Prototype.prototype = base.prototype;
                return Prototype()
            }

            var Foo = function () {
                this.a = 10;
                this.emit = function () {
                    alert(this.a);
                }
            }

            var Bar = function () {
                Foo.call(this);
                Bar.prototype.emit.call(this);
            }
            Bar.prototype = new Foo()

            var bar = Bar();

        </script>
    </html>
</html>
